/******************************************************************
*
*    CyberUPnP for Java
*
*    Copyright (C) Satoshi Konno 2002
*
*    File: USN.java
*
*    Revision;
*
*    12/09/02
*        - first revision.
*
******************************************************************/

package com.fiberhome.remoteime.cybergarage.unnp.device;

public class USN
{
    public final static String ROOTDEVICE = "upnp:rootdevice";

    public final static boolean isRootDevice(String usnValue)
    {
        if (usnValue == null)
            return false;
        return usnValue.endsWith(ROOTDEVICE);
    }

    // Begin modify for MultiScreen.
    public final static boolean isHiMultiScreenDevice(String ntValue)
    {
        if (ntValue == null)
            return false;
        return ntValue.endsWith(ST.MULTISCREEN_DEVICE);
    }
    // End modify for MultiScreen.

    public final static String getUDN(String usnValue)
    {
        if (usnValue == null)
            return "";
        int idx = usnValue.indexOf("::");
        if (idx < 0)
            return usnValue.trim();
        String udnValue = new String(usnValue.getBytes(), 0, idx);
        return udnValue.trim();
    }
}
